<script setup lang="ts">
//console.log

//有些项目的配置会除去console.log等打印
function MyObject(){}
let arr:any = new Array(20000).fill(null).map(e => new (MyObject as any)())
console.log(arr); //内部对其产生强引用
//prod移除console.log 
//console内部会持有打印的东西的引用
arr = null;

</script>

<template>
  <div>内存泄漏-console</div>
  <!-- https://wap.sciencenet.cn/blog-811611-1176330.html?mobile=1 -->
</template>

<style scoped>

</style>
